﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Koonsoft.HYCRM.BLL;
using Koonsoft.HYCRM.DAL;
using Koonsoft.HYCRM.Model;

public partial class Consultation_MakeConsultation : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }

    protected void btnSave_Click(object sender, EventArgs e)
    {
        int empolyeeID = new EmpolyeeBLL().GetEmpolyeeInfoByLoginName(User.Identity.Name).EmpolyeeID;
        string customer = Customer.Text.Trim();
        string telephone = Mobile.Text.Trim();
        string qq = QQ.Text.Trim();
        int delegateType = Convert.ToInt32(DelegateType.SelectedValue);
        string remark = ConsultationRemark.Text.Trim();

        new ConsultationBLL().AddConsultation(customer, telephone, delegateType, remark, qq, empolyeeID);

        ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript",
                                               "<script>alertOK();</script>");
    }
}